import { Column, CreateDateColumn, Entity, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
import { Spec } from './spec.entity';

@Entity()
export class SpecValue {
  @PrimaryGeneratedColumn()
  id: number;

  @Column({
    comment:'规格值',
  })
  value: string;

  @CreateDateColumn()
  createTime: Date;

  @UpdateDateColumn()
  updateTime: Date;

  @ManyToOne(()=> Spec, (data)=> data.specValue,{onDelete:'CASCADE'})
  spec: Spec
}